<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>奖学金</title>

    <!--使用IE兼容模式渲染-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <meta name="renderer" content="webkit">
    <link rel="stylesheet" href="http://css.tt.gzedu.com/workeredu_cn/platform_admin/v1.0/style/dist/zui@1.8.1/css/zui.min.css">
    <link rel="stylesheet" href="http://css.tt.gzedu.com/workeredu_cn/platform_admin/v1.0/style/dist/zui@1.8.1/css/zui-theme.css">
    <link rel="stylesheet" href="http://css.tt.gzedu.com/workeredu_cn/platform_admin/v1.0/style/dist/hover.css">

    <link rel="stylesheet" href="http://css.tt.gzedu.com/workeredu_cn/platform_admin/v1.0/style/h-base.css">
    <link rel="stylesheet" href="http://css.tt.gzedu.com/workeredu_cn/platform_admin/v1.0/style/h-mhqy.css">
</head>
<body class="body_bg">

<div class="scholarship_body">
    <div class="tabs_list">
        <div class="tabs_item active">
            <span>1</span>
            <strong>基本信息</strong>
        </div>
        <div class="tabs_item active">
            <div class="img_sch"></div>
        </div>
        <div class="tabs_item active">
            <span>2</span>
            <strong>流程设置</strong>
        </div>
        <div class="tabs_item active">
            <div class="img_sch"></div>
        </div>
        <div class="tabs_item active">
            <span>3</span>
            <strong>奖项设置</strong>
        </div>
    </div>

    <form class="form-horizontal">
        <div class="form-group">
            <label for="input_01" class="col-sm-2">规则</label>
            <div class="col-md-3 col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox"> 按学员比例
                    </label>
                </div>
            </div>
            <div class="col-md-3 col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox"> 按学员人数
                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="input_02" class="col-sm-2">奖学条件</label>
            <div class="col-md-3 col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox"> 处于第一至五学期内
                    </label>
                </div>
            </div>
            <div class="col-md-3 col-sm-10">
                <div class="checkbox">
                    <label>
                        <input type="checkbox"> 本学期各科成绩均 ≥
                        <input type="text" class="form-control input-sm" style="display: inherit;width: 110px;">
                    </label>
                </div>

            </div>
        </div>
        <div class="bonus_list">
            <div class="form-group">
                <label for="" class="col-sm-2 required">奖金 1</label>
                <div class="col-md-3 col-sm-10">
                    <input type="text" class="form-control" placeholder="奖学金名称">
                </div>
                <div class="col-md-3 col-sm-10">
                    <input type="text" class="form-control" placeholder="覆盖员工比例">
                </div>
                <div class="col-md-3 col-sm-10">
                    <input type="text" class="form-control" placeholder="覆盖员工比例">
                </div>
                <div class="col-md-1 col-sm-10">
                    <div class="btn-group">
                        <button type="button" class="btn btn_add_j">+</button>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label for="" class="col-sm-2 required">奖金 2</label>
                <div class="col-md-3 col-sm-10">
                    <input type="text" class="form-control" placeholder="奖学金名称">
                </div>
                <div class="col-md-3 col-sm-10">
                    <input type="text" class="form-control" placeholder="覆盖员工比例">
                </div>
                <div class="col-md-3 col-sm-10">
                    <input type="text" class="form-control" placeholder="覆盖员工比例">
                </div>
                <div class="col-md-1 col-sm-10">
                    <div class="btn-group">
                        <button type="button" class="btn btn_add_j">+</button>
                        <button type="button" class="btn btn_remove">-</button>
                    </div>
                </div>
            </div>
        </div>


        <div class="form-group  text-center">
            <div class="col-sm-offset-2 col-sm-8">
                <button type="button" class="btn btn-danger btn-lg">设置完成 ，保存</button>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript" src="http://css.tt.gzedu.com/workeredu_cn/platform_admin/v1.0/js/jquery-2.1.4.min.js"></script>

<script>
    $(function () {
        $('body').on('click','.btn_add_j',function () {
            $(this).parents('.form-group').after('<div class="form-group">\n' +
                '                <label for="" class="col-sm-2 required">奖金 </label>\n' +
                '                <div class="col-md-3 col-sm-10">\n' +
                '                    <input type="text" class="form-control" placeholder="奖学金名称">\n' +
                '                </div>\n' +
                '                <div class="col-md-3 col-sm-10">\n' +
                '                    <input type="text" class="form-control" placeholder="覆盖员工比例">\n' +
                '                </div>\n' +
                '                <div class="col-md-3 col-sm-10">\n' +
                '                    <input type="text" class="form-control" placeholder="覆盖员工比例">\n' +
                '                </div>\n' +
                '                <div class="col-md-1 col-sm-10">\n' +
                '                    <div class="btn-group">\n' +
                '                        <button type="button" class="btn btn_add_j">+</button>\n' +
                '                        <button type="button" class="btn btn_remove">-</button>\n' +
                '                    </div>\n' +
                '                </div>\n' +
                '            </div>')
            updateIndex() ;
        })

        $('body').on('click','.btn_remove',function () {
            $(this).parents('.form-group').remove() ;
            updateIndex() ;
        })

        //重新编号
        function updateIndex() {
            var _index = $('.required') ;
            for(var i = 0 ; i < _index.length ; i++){
                _index.eq(i).html('奖金 '+ (i+1)) ;
            }
        }



    })
</script>
</body>
</html>
